Advertisement
pleasedontcode

Analog Clock rev_03

May 2nd, 2024
771
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /********* Pleasedontcode.com **********
  2.  
  3.     Pleasedontcode thanks you for automatic code generation! Enjoy your code!
  4.  
  5.     - Terms and Conditions:
  6.     You have a non-exclusive, revocable, worldwide, royalty-free license
  7.     for personal and commercial use. Attribution is optional; modifications
  8.     are allowed, but you're responsible for code maintenance. We're not
  9.     liable for any loss or damage. For full terms,
  10.     please visit pleasedontcode.com/termsandconditions.
  11.  
  12.     - Project: Analog Clock
  13.     - Source Code NOT compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2024-05-03 03:58:31
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* Analog clock show time */
  21. /****** SYSTEM REQUIREMENT 2 *****/
  22.     /* Clock hands, white background, black clock hands, */
  23.     /* blue second hands, yellow minute hands */
  24. /****** END SYSTEM REQUIREMENTS *****/
  25.  
  26. /****** DEFINITION OF LIBRARIES *****/
  27. #include <Wire.h>
  28. #include <Adafruit_SSD1306.h> // https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED.git
  29.  
  30. /****** FUNCTION PROTOTYPES *****/
  31. void setup(void);
  32. void loop(void);
  33.  
  34. /***** DEFINITION OF I2C PINS *****/
  35. const uint8_t Vg_SSD1306OledDisplay_I2C_PIN_SDA_D21 = 21;
  36. const uint8_t Vg_SSD1306OledDisplay_I2C_PIN_SCL_D22 = 22;
  37. const uint8_t Vg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 60;
  38.  
  39. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  40. Adafruit_SSD1306 display(Vg_SSD1306OledDisplay_I2C_PIN_SDA_D21, Vg_SSD1306OledDisplay_I2C_PIN_SCL_D22);
  41.  
  42. void setup(void)
  43. {
  44.   // put your setup code here, to run once:
  45.   display.begin(SSD1306_SWITCHCAPVCC, Vg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS);
  46. }
  47.  
  48. void loop(void)
  49. {
  50.   // put your main code here, to run repeatedly:
  51.   // Analog clock show time
  52.   // Clock hands: white background, black clock hands, blue second hands, yellow minute hands
  53. }
  54.  
  55. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement